package com.sfzd5.AnswerSheetHelper.inter;


import org.bytedeco.javacpp.opencv_core;

/**
 * 兼容android与java的类
 public static BufferedImage MatToBufferedImage(Mat mat) {
    return Java2DFrameUtils.toBufferedImage(mat);
 }

 public static Mat BufferedImageToMat(BufferedImage img) {
    return Java2DFrameUtils.toMat(img);
 }





 *     /**
 *      * Bitmap转化为IplImage
 *      *
 *      * @param bitmap
 *      * @return
 *      *
public Mat BitmapToMat(IBitmap bitmap){
    Mat mat=new Mat();
    iplImage=IplImage.create(bitmap.getWidth(),bitmap.getHeight(),IPL_DEPTH_8U,4);
    *bitmap.copyPixelsToBuffer(mat.createBuffer());
    return mat;
}

*     **
*      * IplImage转化为Bitmap
*      *
*      * @param mat
*      * @return
*      *
public IBitmap MatToBitmap(Mat mat){
    IBitmap bitmap=null;
    bitmap=IBitmap.createBitmap(mat.size().width(),mat.size().height(),
    IBitmap.Config.ARGB_8888);
    bitmap.copyPixelsFromBuffer(mat.createBuffer());
    return bitmap;
}
 */
public interface IBitmap {
    opencv_core.Mat toMat();
    void setBitmap(opencv_core.Mat mat);
}
